import express from 'express';
import upload from '../middleware/upload.js';
import {
  getStoreInfo,
  updateStoreInfo
} from '../controllers/storeController.js';

const router = express.Router();

router.get('/', getStoreInfo);

router.put('/',
  upload.fields([
    { name: 'logo', maxCount: 1 },
    { name: 'banner', maxCount: 1 },
    { name: 'wechat_qr', maxCount: 1 },
    { name: 'store_images', maxCount: 10 }
  ]),
  updateStoreInfo
);

export default router;

